interface statusType {
  ticket: string
  foremanTel: string
  workerId: string
  bossTel: string
  recordYear: string
  recordMonth: string
}

const getDefaultState = () => {
  return {
    ticket: '',
    foremanTel: '',
    workerId: '',
    bossTel: '',
    recordYear: '',
    recordMonth: ''
  } as statusType
}

const state = getDefaultState()

const mutations = {
  SET_TICKET: (state: statusType, ticket: string) => {
    state.ticket = ticket
  },
  SET_FOREMANTEL: (state: statusType, foremanTel: string) => {
    state.foremanTel = foremanTel
  },
  SET_WORKID: (state: statusType, workerId: string) => {
    state.workerId = workerId
  },
  SET_BOSSTEL: (state: statusType, bossTel: string) => {
    state.bossTel = bossTel
  },
  SET_RECORDYEAR: (state: statusType, recordYear: string) => {
    state.recordYear = recordYear
  },
  SET_RECORDMONTH: (state: statusType, recordMonth: string) => {
    state.recordMonth = recordMonth
  }
}

export default {
  namespaced: true,
  state,
  mutations
}
